<!doctype html>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<html>
<head>
<meta charset="utf-8">
<jsp:include page="/common/commonCss.jsp"/>
<jsp:include page="/common/commonJs.jsp"/>
<link rel="stylesheet" type="text/css" href="${basePath }commonCss/css/global.css">
<link rel="stylesheet" type="text/css" href="${basePath }commonCss/css/layout.css">
<link rel="stylesheet" type="text/css" href="${basePath }commonCss/css/easyui.css">
<link rel="stylesheet" type="text/css" href="${basePath }commonCss/css/zTreeStyle.css">
<script src="${basePath }commonJs/jquery.min.js"></script>
<script src="${basePath }commonJs/jquery.easyui.min.js"></script>
<script src="${basePath }commonJs/jt_normal.js"></script>
<script src="${basePath }commonJs/jt_select.js"></script>
<script src="${basePath }commonJs/jquery.ztree.all.js"></script>
<script src="${basePath }commonJs/tags/My97DatePicker/WdatePicker.js"></script>
<title>嘉童游乐中心-新增商品出库</title>

	<SCRIPT type="text/javascript">
		var disValue = "${entity.disValue}";
		/**计算折后价*/
		function zl(price){
			if(price == null || price == undefined || price == ''){
				return "";
			}
			if(disValue == null || disValue == undefined || disValue == '' || disValue <0){
				return price;
			}
			return (price*disValue).toFixed(2);
		}
	</SCRIPT>
</head>
<body class="bg">
<div class="content m_auto">
	<div class="content_l mt10">
    	<ul>
	      <shiro:hasPermission name="promotion/home.shtml">
					<li class="content_hover"><a
						href="${basePath }promotion/home.shtml"><i class="nav_icon_b"></i><br>限时打折</a></li>
				</shiro:hasPermission>
        </ul>
    </div>
    <div class="content_r mt10">
    	<div class="p20">
    	<div class="file_single_dl f14 fixed">
    		<h1 class=""><font size="+1">活动设置</font></h1>
            <hr>
        	<dl class="fixed" style="overflow:hidden">
            	<dd><label>活动名称：</label>
            		${entity.campName }
            	</dd>
                <dd><label>活动设置人：</label>${entity.userName}</dd>
                <dd><label id="currentDate">活动设置时间：</label>${entity.modiTimeStr }</dd>
            </dl>
        	<dl class="fixed" style="overflow:hidden">
                <dd><label>限时折扣：</label>${entity.disDesc }
                </dd>
                <dd><label>活动范围：</label>${entity.brankName }
                	
                </dd>
            </dl>
        	<dl class="fixed" style="overflow:hidden">
            	   <dd><label>备注：</label><p style="word-break:break-all; width:200px; overflow:auto;">${entity.comments } </p><%-- <textarea class="textare w200" readonly>${entity.comments }</textarea> --%></dd>
            
            	<dd><label>活动有效期：</label>
					${entity.startDateStr }<span>至</span>${entity.endDateStr }
                </dd>
             </dl>
        </div>
       
        <table class="table">
                    	<tr>
                        	<th>序号</th>
                            <th>商品编号</th>
                            <th>商品名称</th>
                            <th>商品分类</th>
                            <th>规格</th>
                            <th>单位</th>
                            <th>商品原价</th> 
                            <th>折扣后价格</th>
                        </tr>
                        <c:forEach items="${prdEntityList }" var="prdEntity" varStatus="xh" >
	                        <tr>
	                        	<td>${xh.count}</td>
	                            <td>${prdEntity.pkPrdId}</td>
	                            <td>${prdEntity.prdName}</td>
	                            <td>${prdEntity.cateName}</td>
	                            <td>${prdEntity.prdSpec==null?"-":prdEntity.prdSpec}</td>
	                            <td>${prdEntity.unitName==null?"-":prdEntity.unitName}</td> 
	                            <%-- <td>${prdEntity.branchPrice==null?"-":prdEntity.branchPrice}</td>  --%>
	                             <td>${prdEntity.productPrice == null?"-":prdEntity.productPrice }</td>
	                            <td><script type="text/javascript">document.write(zl(${prdEntity.productPrice}))</script></td>  
	                        </tr>
                        </c:forEach>
                        
                    </table>
                    
                    <dl class="fixed order_dl">
							<dd><label><b>处理历史：</b></label>
                        	</dd><dd>
                            <table class="table">
                                <tbody><tr>
                                    <th>时间</th>
                                    <th>处理人</th>
                                    <th>结果</th>
                                    <th>处理意见</th>
                                </tr>
                                <c:forEach items="${hisWorkFlowList }" var="hisEntity" >
			                        <tr>
	                                    <td style="width:40%">${hisEntity.optTime }</td>
	                                    <td>${hisEntity.optName }</td>
	                                    <td>${hisEntity.result }</td>
	                                    <c:if test="${empty hisEntity.advice }">
	                                    	<td><input type="text" disabled  class="iput_t w150"></td> 
	                                    </c:if>
	                                    <c:if test="${!empty hisEntity.advice  && fn:length(hisEntity.advice) <= 15}">
	                                    	<td><input type="text" disabled title="${hisEntity.advice }" value="${fn:substring(hisEntity.advice!=null?hisEntity.advice:'', 0, 15)}" class="iput_t w150"></td> 
	                                    </c:if>
	                                    <c:if test="${!empty hisEntity.advice && fn:length(hisEntity.advice) > 15}">
	                                    	<td><input type="text" disabled title="${hisEntity.advice }" value="${fn:substring(hisEntity.advice!=null?hisEntity.advice:'', 0, 15)}..." class="iput_t w150"></td> 
	                                    </c:if>
	                                </tr>
		                        </c:forEach>
                            </tbody></table>
                           
                        </dd>
            <form id="process_form_id" action="${basePath }promotionWorkFlow/approvalProcessPromotionSub.shtml" method="post">
                        <dd><label class="fl"><b>审批结果：</b></label>
                        	<ul class="ul_radio fl">
                            	<li><input type="radio" class="mr5" name="handleAdviceDes"  value="同意" checked="checked" onclick="javascript:$('#handleAdvice_id').val(1);">同意</li>
                                <li><input type="radio" class="mr5" name="handleAdviceDes" value="不同意" onclick="javascript:$('#handleAdvice_id').val(0);">不同意</li>
                            </ul>
                        </dd>
                        <div class="clear"></div>
                        <dd>
                        	<label class="vt"><b>审批意见：</b></label>
                        	<textarea class="w200 textare" name="handleReason"></textarea></dd>
            	
            	</dl>
                    <div class="btm_btn m10">
                        <dl>
                        	
                            <dd><input class="btn" type="button" value="提交" onclick="javascript:process_sub(1)"></dd>
                            <dd><input class="btn" type="button" value="退回" onclick="javascript:process_sub(2)"></dd>
                            <dd><input class="btn" type="button" value="返回" onclick="javascript:window.location.href='${basePath }promotion/home.shtml'"></dd>
                            
                        </dl>
                    </div>
               <input type="hidden" name="processInstanceId" value="${entity.fkFlowinstId }">
               <input type="hidden" name="businessKey" value="${entity.pkCampId }">
               <input type="hidden" name="handleAdvice" id="handleAdvice_id" value="1"><!-- 1、 同意   2、 不同意  -->
           </form>
        </div>
    </div>
</div>
<script type="text/javascript">
	var path = "${basePath }";
	function process_sub(flag){
		var ms = (t == 1 ? '提交':'退回');
		var flag = false ; 
		$.messager.confirm('提示', '你确定要'+ms+'吗?', function(r) {
			if(r){
				if(flag == 1){
					path = path + "promotionWorkFlow/approvalProcessPromotionSub.shtml";
				}else{
					path = path + "promotionWorkFlow/approvalProcessPromotionExt.shtml";
				}
				$("#process_form_id").attr("action",path);
				$("#process_form_id").submit();
			}
		});
	}
	
</script>
<!---弹出层 成员信息编w辑--->
<div id="addSelectGoods" class="easyui-window" title="新增打折商品" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:1200px; height:400px;position:relative;">
    	<div class="file_single_dl mt10">
        	<dl>
            	<dd><label>商品编号：</label><input type="text" class="iput_t w200"></dd>
                <dd><label>商品名称：</label><input type="text" class="iput_t w200"></dd> 
                <dd><input type="button" class="btn " value="查询"></dd> 
            </dl>
        </div>
        <div class="tab_normal mt10">
            <div class="payment_l tc" style="height:300px; overflow:auto"><div class="ztree" id="sptree"></div></div>
            <div style="width:850px; float:left; margin-left:20px;">
          	<table class="table">
                    	<tr> 
                       		<th><input type="checkbox"/></th>
                        	<th>序号</th>
                            <th>商品编号</th>
                            <th>商品名称</th>
                            <th>商品分类</th>
                            <th>规格</th>
                            <th>计量单位</th> 
                            <th>商品价格</th>
                        </tr>
                        <tr> 
                        	<td><input type="checkbox"/></td>
                        	<td>1</td>
                            <td>KP0001</td>
                            <td>可口可乐</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr>
                       	 <td><input type="checkbox"/></td>
                          <td>2</td>
                            <td>KP0002</td>
                            <td>雪碧</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"/></td>
                       		<td>3</td>
                            <td>KP0003</td>
                            <td>百事可乐</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"/></td>
                       		<td>3</td>
                            <td>KP0003</td>
                            <td>百事可乐</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"/></td>
                       		<td>3</td>
                            <td>KP0003</td>
                            <td>百事可乐</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"/></td>
                       		<td>3</td>
                            <td>KP0003</td>
                            <td>百事可乐</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr>
                            <td><input type="checkbox"/></td>
                       		<td>3</td>
                            <td>KP0003</td>
                            <td>百事可乐</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>2.5</td>
                        </tr>
                        <tr> 
                         <td><input type="checkbox"/></td>
                         	<td>6</td>
                            <td>KP0006</td>
                            <td>王老吉</td>
                            <td>饮料</td>
                            <td>100ML</td>
                            <td>瓶</td>
                            <td>3.5</td> 
                        </tr>
                    </table>
                    <input class="btn mt10" type="button" value="确定" onclick="javascript:window.location.href='promo_activity_new.html'">
                    
                    <!---翻页-->
                    <div class="page fr m10">
                        <span>第3/2000页</span>
                        <span>首页</span>
                        <span>上一页</span>
                        <span><a href="#">下一页</a></span>
                        <span><a href="#">末页</a></span>
                        <span>跳转到<input type="text" class="black_text mlr5">页</span>
                    </div>
                    <!----->
            </div>
		</div>
</div>
</body>
</html>














>